errDe   dw  "Error division enteros por cero" ;31

divE proc near
    push bp
    mov bp,sp
    push ax
    push bx
    push dx

    cmp [bp+4],0
    jz  errD0E
    mov dx,0
    mov ax, [bp+6]
    mov bx, [bp+4]
    idiv bx
    mov [bp+6],ax
    
    pop dx
    pop bx
    pop ax
    pop bp
    ret 2
errD0E:
    push offset errDe
    push 31
    call writeSTR
    jmp fin
divE endp


